package com.jy.api.controller.admin;

import com.jy.api.service.MemberIntegralTransactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by xiaohua on 2019/5/7.
 */
@RequestMapping(value = "v1/admin/", produces = "application/json;charset=utf-8")
@RestController
public class MemberIntegralTransactionController {


    @Autowired
    private MemberIntegralTransactionService transactionService;

    @GetMapping("gral-list")
    public ResponseEntity gralList(@RequestParam("storeId")String storeId,@RequestParam("type")String type, @RequestParam(value = "mobile",required = false)String mobile, @RequestParam(value = "name",required = false)String name, Pageable pageable,@RequestParam(value = "begin",required = false)String begin,@RequestParam(value = "end",required = false)String end){
        return ResponseEntity.ok(transactionService.getList(storeId, mobile, name, begin, end,type, pageable));
    }

}
